			<?php if(isset($error)){echo $error;?>
				<div id="tonyError" class="error"><?php echo $error;?></div>
			<?php }elseif (isset($success)){?>
				<div id="tonySuccess" class="success"><?php echo $success;?></div>
			<?php }?>
			<div id="content">
                <div class="inner">
					<div class="topcolumn">
						<div class="logo"></div>
                            <ul  id="shortcut">
                                <li> <a href="#" title="Back To home"> <img src="<?php echo base_url();?>public/admin/img/icon/shortcut/home.png" alt="home"/><strong>Home</strong> </a> </li>
                                <li> <a href="#" title="Website Graph"> <img src="<?php echo base_url();?>public/admin/img/icon/shortcut/graph.png" alt="graph"/><strong>Graph</strong> </a> </li>
                                <li> <a href="#" title="Setting" > <img src="<?php echo base_url();?>public/admin/img/icon/shortcut/setting.png" alt="setting" /><strong>Setting</strong></a> </li> 
                                <li> <a href="#" title="Messages"> <img src="<?php echo base_url();?>public/admin/img/icon/shortcut/mail.png" alt="messages" /><strong>Message</strong></a><div class="notification" >10</div></li>
                            </ul>
					</div>
                    <div class="clear"></div>
                  	<div class="onecolumn" >
                  	
	                  <div class="header"><span ><span class="ico  gray connect"></span>Add Photos To <?php echo $album_info['name'];?></span> </div><!-- End header -->	
	                  <div class="clear"></div>
	                  <div class="content" >
	                  	<div class="tab_container">
	                  	<div class="tab_content"> 
	                  	<div class="load_page">
	                  	<div class="formEl_b">	
	                    	<form id="validation" action="<?php echo  admin_url('gallery/add-image');?>/<?php echo $albumid; ?>" method="post" enctype="multipart/form-data" > 
                         		<div class="section ">
                                	<label> <?php echo $this->lang->line('title'); ?> *<small><?php echo $this->lang->line('title'); ?></small></label>   
                                      <div> 
                                      	<input type="text" class="validate[required] large" name="title" id="title" value="<?php echo set_value('title');?>" />
                                      </div>
                            	</div>
                               	<div class="section">
                                   	<label><?php echo $this->lang->line('source'); ?> * :<small><?php echo $this->lang->line('required'); ?>: jpg, png, jpeg, gif & <?php echo $this->lang->line('size'); ?> 3MB</small></label>   
                                  	<div>
                                  		<ul>
						            		<li>
						            			<input type="file" name="images_0"  value="" style="width: 250px;"/>
							            	</li>
							            	<li  id="add_more"><a href = "javascript:void(0)" onclick = "add_more_image('1');">Add more</a></li>
					            		</ul>
                                  	</div>      
                               	</div>
                               	<div class="section">
                               		<label><?php echo "ALBUM"; ?> * :<small><?php echo "Album"; ?></small></label>  
                               		<div>
	                               		<?php if(count($cate)>0){?>
						                	<select name="category" class="add-order" style="width: 150px;">
						                		<?php foreach ($cate as $k => $v){?>
						                			<?php if($v->id == $albumid){?>
						                				<option value="<?php echo $v->id;?>"><?php echo $v->name;?></option>
						                			<?php }?>
						                		<?php }?>
						                	</select>
						                <?php }?>
				                	</div>
                               	</div>
                                <div class="section last">
                                      <div>
                                        <input type="submit" class="uibutton submit_form" value="<?php echo $this->lang->line('save');?>" id="but_addMenu" />
                                        <a class="uibutton special"   onClick="ResetForm()" title="Reset  Form"   >Clear Form</a>
                                      </div>
                               	</div>
	                    	</form>
	                  	</div> <!-- End .formEl_b -->
	                  	</div> <!-- End .load_page -->
	                  	</div> <!-- End .tab_content -->
	                  	</div> <!-- End .tab_container -->
	                  	</div> <!-- End .content -->
	                  	<div class="clear"/></div>                  
                 	</div><!-- End .onecolumn -->
                  	
                  	</div>
                  	<script type="text/javascript" src="<?php echo base_url();?>public/admin/js/login.js"></script>
        		  <script type="text/javascript">
        		  	loading('Checking',1);		
        			setTimeout( "unloading()", 500 );
					var error = '<?php if(isset($error)){echo $error;}?>';
					if(error != " "){$('#tonyError').addClass('error').html(error).stop(true,true).show().animate({ opacity: 1,right: '10'}, 1000);setTimeout('hideTop()',3500);}
		
					var success = '<?php if(isset($success)){echo $success;}?>';
					if(success != " "){$('#tonySuccess').addClass('success').html(success).stop(true,true).show().animate({ opacity: 1,right: '10'}, 1000);setTimeout('hideTop()',3500);}

					function add_more_image(count){
						count = parseFloat(count) + 1;
						var new_image 	= '<li id = '+(parseFloat(count)-1)+'><input type="file"  name="images_'+(parseFloat(count)-1)+'" value="" style="width:85%;"/> </li>';
						var add_button	= '<a href="javascript:void(0)" onclick="add_more_image('+parseFloat(count)+')">Add more</a> <a style="margin:8px;" href="javascript:void(0)" onclick="close_image('+(parseFloat(count))+')">Close</a>';
						$('#add_more').before(new_image);
						$('#add_more').html(add_button);
					}

					function close_image(id){
						var identity	=	"#"+id;
						$(identity).remove();
						if(id >= 1){
							var idd   = id - 1;
							var count = id + 1;
							var add_button	= '<a href="javascript:void(0)" onclick="add_more_image('+(parseFloat(count)-1)+')">Add more</a> <a style="margin:8px; color:red;font-weight:bold;" href="javascript:void(0)" onclick="close_image('+(parseFloat(idd))+')">Close</a>';
							$('#add_more').html(add_button);
						}
						
					}
					function reback(){
						$('#light_adct').hide();$('#fade_adct').hide();
						window.location = admin_url+'gallery';
					}
				 </script> 
